package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import guoanmaker.operator.business.model.OperatorTrademarkSearchLog;

public interface OperatorTrademarkSearchLogRepository extends JpaRepository<OperatorTrademarkSearchLog, String> , JpaSpecificationExecutor<OperatorTrademarkSearchLog>{

	@Query("select o from OperatorTrademarkSearchLog o order by o.datetime desc")
	public List<OperatorTrademarkSearchLog> findAllSearchLogsDesc();
	
	@Query("select o from OperatorTrademarkSearchLog o where 1=1 and o.user.id=?1 order by o.datetime desc")
	public List<OperatorTrademarkSearchLog> findAllSearchInfoLogsDesc(String id);
}
